package com.xiaoxi.decoratormode.border;

import com.xiaoxi.decoratormode.display.Display;

/**
 * @Author xiaoxi
 * @ProjectName design_mode
 * @PackageName com.xiaoxi.decoratormode.border
 * @ClassName SideBorder
 * @Description TODO
 * @Date 2023/3/14 17:05
 * @Version 1.0
 */
public class SideBorder extends Border {

    private char ch;

    public SideBorder(Display display, char ch) {
        super(display);
        this.ch = ch;
    }


    @Override
    public String getRowText(int row) {
        if(row > getRows()) {
            return "";
        }
        return ch + display.getRowText(row) + ch;
    }
}
